package com.ccl.iot.bean;

import com.ccl.iot.ir.DBUtils;
import com.kookong.app.data.IrData;

public class CodeviewBean {
    public long DevID;  //                     bigint unsigned	-	参考codemaps表的DevID字段
    public int SubDevID;    //                     int unsigned		-	参考codemaps表的SubDevID字段
    public String DevType;  //                     enum			-	参考codemaps表的DevType字段
    public String KeyType;  //                     enum			-	参考codemaps表的CodeType字段
    public String KeyName;
    public String CodeType;   //                     enum			-	参考codes表的Type字段
    public String aCode;    //                     varbinary(255)	-	参考codes表的Code字段
    public long CodeID;    //                     CodeID		: bigint unsigned	-	参考codemaps表的CodeID字段

    //针对空调
    public IrData ac;

    public CodeviewBean(long devID, int subDevID, String devType, String keyType, String keyName, String codeType, String aCode, long codeID) {
        DevID = devID;
        SubDevID = subDevID;
        DevType = devType;
        KeyType = keyType;
        KeyName = keyName;
        CodeType = codeType;
        this.aCode = aCode;
        CodeID = codeID;
    }

    public CodeviewBean(long devID, int subDevID,  String devType, IrData ac, String codeType, long codeID){
        this.ac = ac;
        DevID = devID;
        SubDevID = subDevID;
        DevType = devType;
        KeyType = DBUtils.CODE_TYPE_API;
        KeyName = KeyType;
        CodeType = codeType;
        CodeID = codeID;
    }

    @Override
    public String toString() {
        return "CodeviewBean{" +
                "DevID=" + DevID +
                ", SubDevID=" + SubDevID +
                ", DevType='" + DevType + '\'' +
                ", KeyType='" + KeyType + '\'' +
                ", KeyName='" + KeyName + '\'' +
                ", CodeType='" + CodeType + '\'' +
                ", CodeID=" + CodeID +
                '}';
    }
}
